
#ifndef PROPERTYBOARD_H
#define PROPERTYBOARD_H

#include <BMap>
#include <BLabel>
#include <BButton>
#include <BSpinBox>
#include <BScrollWidget>

#include "WidgetPanel.h"
#include "DialogPanel.h"
#include "LabelPanel.h"
#include "ButtonPanel.h"
#include "SpinBoxPanel.h"
#include "LayoutPanel.h"

class PropertyBoard : public BScrollWidget
{
public:
	PropertyBoard(BWidget* parent = 0);

protected:
	void slotAssetChanged(BObject* object, const BValue& value);

private:
	typedef void (PropertyBoard::* resetFunc)(BObject*);

	void resetDialog(BObject* object);
	void resetLabel(BObject* object);
	void resetButton(BObject* object);
	void resetSpinBox(BObject* object);
	void resetLayout(BObject* object);

private:
	BMap<BString, resetFunc>	_resetFuncMap;
	BHolder<WidgetPanel>		_widgetPanel;
	BHolder<DialogPanel>		_dialogPanel;
	BHolder<LabelPanel>			_labelPanel;
	BHolder<ButtonPanel>		_buttonPanel;
	BHolder<SpinBoxPanel>		_spinBoxPanel;
	BHolder<LayoutPanel>		_layoutPanel;
};
#endif
